import { Button, Result, Space } from 'antd'
import React from 'react'

import { history } from '@umijs/max'

const NoFoundPage: React.FC = () => (
  <Space direction="horizontal" style={{ height: '100vh', width: '100%', justifyContent: 'center' }}>
    <Result
      status="404"
      title="404"
      subTitle="抱歉，你访问的页面不存在"
      extra={
        <Button type="primary" onClick={() => history.back()}>
          返回上一页
        </Button>
      }
    />
  </Space>
)

export default NoFoundPage
